package artid.com.arttogoa.parser;

import java.io.Serializable;
import org.json.JSONObject;
/**
 * 
 *    
 * 项目名称：ArtworkArtA   
 * 类名称   ：TransactionRecordParser   
 * 类描述   ：交易记录实体类+解析   
 * 创建人   ：耿卫斌   
 * 创建时间：2016-8-12 下午5:20:22   
 *
 */
public class TransactionRecordParser extends AppItem implements Serializable{
	private static final long serialVersionUID = 1L;
	private String deal_id;//交易id
	private String amount;//金额
	private String deal_time;//交易时间
	private String desc;//描述
	private String income_state;//收支状态1收入，2支出
	private String deal_state;//交易状态1成功，0失败
	@Override
	public void parse(JSONObject obj) {
		// TODO Auto-generated method stub
		if (null == obj) {
			return;
		}
		deal_id = obj.optString("deal_id");
		amount = obj.optString("amount");
		deal_time = obj.optString("deal_time");
		desc = obj.optString("desc");
		income_state = obj.optString("income_state");
		deal_state = obj.optString("deal_state");
	}
	public String getDeal_id() {
		return deal_id;
	}
	public void setDeal_id(String deal_id) {
		this.deal_id = deal_id;
	}
	public String getAmount() {
		return amount;
	}
	public void setAmount(String amount) {
		this.amount = amount;
	}
	public String getDeal_time() {
		return deal_time;
	}
	public void setDeal_time(String deal_time) {
		this.deal_time = deal_time;
	}
	public String getDesc() {
		return desc;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}
	public String getIncome_state() {
		return income_state;
	}
	public void setIncome_state(String income_state) {
		this.income_state = income_state;
	}
	public String getDeal_state() {
		return deal_state;
	}
	public void setDeal_state(String deal_state) {
		this.deal_state = deal_state;
	}
	public TransactionRecordParser() {
		super();
	}
	public TransactionRecordParser(String deal_id, String amount,
			String deal_time, String desc, String income_state,
			String deal_state) {
		super();
		this.deal_id = deal_id;
		this.amount = amount;
		this.deal_time = deal_time;
		this.desc = desc;
		this.income_state = income_state;
		this.deal_state = deal_state;
	}
	@Override
	public String toString() {
		return "TransactionRecordParser [deal_id=" + deal_id + ", amount="
				+ amount + ", deal_time=" + deal_time + ", desc=" + desc
				+ ", income_state=" + income_state + ", deal_state="
				+ deal_state + "]";
	}
}
